<template>
    <div class="navbar">
        <div class="navbox">
            <div class="navleft">
                <a href></a>
                <p>BT-TECHNOLOGY比特科技</p>
            </div>
            <div class="navzhong">
                <ul class="daohang">
                    <li v-for="(item,index) in navList" :key="index" :class="{'active':index==currentIndex}" @click="toJump(item,index)">
                        <a href="javascript:void(0)">{{item}}</a>
                    </li>
                </ul>
            </div>
            <div class="navright">
                <ul>
                    <li class="mui-icon-extra mui-icon-extra-phone"></li>
                    <li class="rightbang"></li>
                    <li class="righthou">
                        <input type="button" value="学院登陆">
                    </li>
                </ul>
            </div>
        </div>
    </div>
</template>

<script>
export default{
    data(){
        return {
            currentIndex:2,
            navList:[
                "首页",
                "c++研发",
                "测试开发",
                "JAVA",
                "导师阵容",
                "精品项目",
                "学员就业",
                "百宝箱",
            ]
        }
    },
    methods:{
        toJump(item,index){
            this.currentIndex=index;
        }
    }
}
</script>


<style lang="scss" scoped>
.navbox {
    width: 1200px;
    height: 60px;
    background-color: #fff;
    margin: auto;
    display: flex;
    .navleft {
        flex: 2;
        a {
            display: block;
            float: left;
            width: 60px;
            height: 60px;
            background-color: aqua;
        }
        p {
            display: block;
            width: 120px;
            margin-top: 20px;
            float: right;
        }
    }
    .navzhong {
        height: 60px;
        margin-top: -16px;
        flex: 9;
        li {
            width: 80px;
            height: 60px;
            font-size: 12px;
            display: block;
            float: left;
            a {
                display: block;
                color: black;
                text-align: center;
                line-height: 60px;
                
            }
            &.active {
                background: linear-gradient(
                    to right,
                    rgb(0, 225, 255) 0%,
                    rgb(0, 255, 242) 100%
                );
            }
            a:hover {
                // transition: background 1s ease;
                background: linear-gradient(
                    to right,
                    rgb(0, 225, 255) 0%,
                    rgb(0, 255, 242) 100%
                );
            }
        }
    }
    .navright {
        height: 60px;
        flex: 2;
        li {
            float: left;
            font-size: 40px;
            color: #ccc;
            line-height: 31px;
            list-style: none;
        }
        .rightbang {
            width: 2px;
            height: 30px;
            float: left;
            margin-left: 5px;
            background-color: #ccc;
        }
        .righthou {
            float: right;
            input {
                background-color: #f5f5f5;
                border: 1px solid #ccc;
            }
        }
    }
}
</style>
